import 'package:hive/hive.dart';
import 'package:recase/recase.dart';

import 'bt_hive_store.dart';
import 'bt_logon_data.dart';

class BtHiveLogonStore extends BtHiveStore<BtLogonData> {
  BtHiveLogonStore._internal();

  factory BtHiveLogonStore() => _instance;

  static final BtHiveLogonStore _instance = BtHiveLogonStore._internal();

  @override
  Future<void> initHive() async {
    super.initHive();
    Hive.registerAdapter(BtLogonDataAdapter());
  }

  @override
  String boxName() {
    return ReCase(runtimeType.toString()).snakeCase;
  }

  @override
  String boxKey() {
    return ReCase("LogonData").snakeCase;
  }
}
